# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-stdlib-shims
_pkgname=stdlib-shims
pkgver=0.3.0
pkgrel=0
pkgdesc="OCaml Shims to substitute Pervasives with Stdlib"
url="https://github.com/ocaml/stdlib-shims"
arch="all !riscv64"  # limited by ocaml aport
license="LGPL-2.1-only-WITH-linking-exception"
depends="ocaml-runtime"
makedepends="dune ocaml ocaml-findlib ocaml-compiler-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/stdlib-shims/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	dune build @install
}

check() {
	dune runtest
}

package() {
	dune install \
		--destdir="$pkgdir" \
		--prefix=/usr \
		--libdir=/usr/lib/ocaml

	# There's just a readme and changelog.
	rm -Rf "$pkgdir"/usr/doc
}

sha512sums="
c4f2a6dc38171e1d2125cc30e5d63f64f49d8ed011df6588dfa0b51f9dc634f9e8771d6237110c7d1d5e81e161dd5112eaae8df71ee3a7d8a010c2732fcc75ca  ocaml-stdlib-shims-0.3.0.tar.gz
"
